Repository navigation
NAV_MESH_AVOID annotation penalizes bot path costs - #2170
Merged
sunzenshen merged 1 commit intoOct 9, 2026
Merged
Conversation
sunzenshen
added a commit
to sunzenshen/neo
that referenced
this pull request
Oct 1, 2026
…o the research branch
sunzenshen
force-pushed
the
bot-nav-avoid-path-cost
branch
from
October 3, 2026 17:50
fabfab6 to
c72254f
Compare
sunzenshen
added a commit
to sunzenshen/neoAssets
that referenced
this pull request
Oct 4, 2026
A connectivity check of the open navmesh PRs failed this mesh on two half cuts. Restore the drops whose climbs were kept: 972 -> 128 off the crate step near (2262, -375) and 3489 -> 277 off the parapet top near (-75, -352). Ghost spawn 7's mezzanine (z -144) was planned only by Recon, up the crate stack. Restore master's way in for every class, the 69 u drop 3496 -> 3498 off the parapet, one way (the climb back stays cut). Mark the parapet top (3489, 3496) NAV_MESH_AVOID: it is a 5 u strip bots fall off, and unmarked it drew Recons off the crate stack, so they reached the ghost later. Mark ladder 2's foot (885) AVOID: bots approaching the ladder there catch on a brush, and the restored routes sent more of them to it. The marks act through a path cost that honors AVOID (NeotokyoRebuild/neo#2170). Existing areas keep their ids; both ladders are unchanged. Re-analyzed in game (same graph, fresh visibility).
This was referenced Oct 4, 2026
sunzenshen
force-pushed
the
bot-nav-avoid-path-cost
branch
from
October 5, 2026 04:02
c72254f to
4986c1b
Compare
sunzenshen
force-pushed
the
bot-nav-avoid-path-cost
branch
from
October 5, 2026 06:00
4986c1b to
48fb15f
Compare
sunzenshen
marked this pull request as ready for review
October 5, 2026 06:01
sunzenshen
force-pushed
the
bot-nav-avoid-path-cost
branch
from
October 5, 2026 06:04
48fb15f to
72ae446
Compare
This was referenced Oct 8, 2026
Contributor
|
No issues that I can ID. 👍 |
sunmachine
approved these changes
Oct 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Bots route around NAV_MESH_AVOID areas
NAV_MESH_AVOIDis the stock nav attribute for "avoid this area unless alternatives are too dangerous" (nav.h), set withnav_avoidin the nav editor. Today it means nothing to NT;RE bots:CNEOBotPathCostignores it, so a mesh author has no way to steer bots away from a problematic spot short of cutting it out of the mesh.With this PR a step into an AVOID area costs 20 times its cost (
neo_bot_path_penalty_avoid_multiplier). Bots route around such an area wherever a reasonable alternative exists. The cost stays finite, so an AVOID area that is the only way somewhere is still used. A ladder crossing pays the multiplier when either end is AVOID, so a risky ladder can be discouraged by marking its foot, not only its top.One file,
neo_bot_path_cost.cpp, +13.Navmesh PRs that rely on this
These navmesh PRs mark
NAV_MESH_AVOIDareas and are reviewed and merged after this one. Without it each mesh still loads and works; the marks are ignored.ntre_ridgeline_ctg): the tower-base strip (area 16274), a 25 u strip between handrails and a power-line tower base where most bot visits stalled.ntre_tarmac_ctg): the parapet top (3489, 3496), which Recons otherwise take to ghost spawn 7, and ladder 2's foot (885).ntre_apparatus_dm): ladder 13's foot (5374) and the blast-door frame top (8604), where bots stalled under a ceiling beam.ntre_rise_ctg): 89 areas, the basement pool, the balcony rail top above it and ladder 1's foot room.These also mark
NAV_MESH_AVOIDareas and were measured only on a build that carries this PR: NeotokyoRebuild/neoAssets#161 (ntre_threadplate_ctg, the crouch-duct pocket), #162 (ntre_sentinel_ctg) and #165 (ntre_sentinel_jgr, the elevator pits and walkway slivers), #164 (ntre_skyline_ctg, ladder 1's foot).Why a path cost, not removing the area
Cutting an area out of the mesh also removes the only route when nothing else reaches that place, and bots then cannot follow a player or an objective there at all. A cost keeps the route for when it is needed and lets the mesh say "not this way if you have a choice".
Where it applies
No mesh on master carries
NAV_MESH_AVOIDtoday. It ships with its first users, the navmesh PRs above. Ridgeline (NeotokyoRebuild/neoAssets#143) marks one area: a 25 u strip between handrails and a power-line tower base where most bot visits stalled. Bots rarely route there at all, so ridgeline shows the mark working rather than a large effect. The measurable effect is on maps whose meshes will mark busier spots. On the research meshes there are 19 AVOID areas on 7 maps:Evidence
Bot matches with the research meshes, 30 bots, default weapon damage, CTG with the ghost pinned at 3 spawns (JGR: the juggernaut; DM: unpinned), both arms interleaved in one batch. A temporary cvar switched the multiplier in the test build only; this PR has no switch.
The value. The first batch compared x5, x20 and x100 against off (232 matches, 7 maps):
x100 empties the AVOID areas further but adds long stuck episodes elsewhere, because routes shift onto worse ground. x20 keeps most of the gain without that.
Confirmation, x20 against off (160 matches on the 5 maps whose AVOID areas see traffic, 6 repeats):
The overall totals of the confirmation batch rise (x1.15) only because of a single match: one sentinel_jgr round in which several bots stuck in the area at the foot of a ladder produced 463 events, 153 of them from one bot. The same spot produces about 105 events over the other matches in either arm.
Risk
Low. Only meshes that mark AVOID are affected, and the cost is finite, so no route is lost.
Toolchain
Linked Issues